package cn.com.bluemoon.daps.standard.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import cn.com.bluemoon.daps.common.domain.BaseModel;
import cn.com.bluemoon.daps.standard.dto.ExcelImportGroup;
import cn.com.bluemoon.daps.standard.dto.IExcelSourceModel;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * <p>
 * 基础标准-字典代码表
 * </p>
 *
 * @author admin
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors
@ApiModel(value = "DapStandardBasicDic", description = "基础标准-字典代码表")
public class DapStandardBasicDic extends BaseModel<DapStandardBasicDic> implements IExcelModel, IExcelDataModel, IExcelSourceModel {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "代码基本信息的代码英文名称")
    @NotBlank(message = "代码基本信息的代码英文名称不可为空")
    @NotBlank(message = "代码基本信息的代码英文名称不可为空", groups = {ExcelImportGroup.class})
    @Excel(name = "*代码名称")
    private String baseCode;

    @ApiModelProperty(value = "代码基本信息的代码中文名称")
    @NotBlank(message = "代码基本信息的代码中文名称不可为空")
    @Excel(name = "*中文名称")
    private String baseCodeName;

    @ApiModelProperty(value = "代码基本信息的备注/基础数据标准业务定义")
    private String baseRemark;

    @ApiModelProperty(value = "关联基础标准表id")
    private String basicStandardId;

    @ApiModelProperty(value = "备注，描述代码")
    @Excel(name = "备注")
    private String businessDefine;

    @ApiModelProperty(value = "代码名称，对应单个标准中唯一")
    @NotBlank(message = "代码名称不可为空")
    @NotBlank(message = "代码名称不可为空", groups = {ExcelImportGroup.class})
    @Excel(name = "*代码值名称")
    private String codeName;

    @ApiModelProperty(value = "代码值，对应单个标准中唯一")
    @NotBlank(message = "代码值不可为空")
    @NotBlank(message = "代码值不可为空", groups = {ExcelImportGroup.class})
    @Excel(name = "*代码值（唯一）")
    private String codeValue;

    @ApiModelProperty(value = "导入报错信息存储", hidden = true)
    @TableField(exist = false)
    private String errorMsg;

    @TableField(exist = false)
    private int rowNum;


}
